3.51 \(\int \frac{d+e x^2+f x^4}{x (a+b x^2+c x^4)} \, dx\)

Optimal. Leaf size=97 \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (a b f-2 a c e+b c d)}{2 a c \sqrt{b^2-4 a c}}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{d \log (x)}{a} \]

[Out]

((b*c*d - 2*a*c*e + a*b*f)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a*c*Sqrt[b^2 - 4*a*c]) + (d*Log[x])/a
- ((c*d - a*f)*Log[a + b*x^2 + c*x^4])/(4*a*c)

________________________________________________________________________________________

Rubi [A]  time = 0.200432, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {1663, 1628, 634, 618, 206, 628} \[ \frac{\tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right ) (a b f-2 a c e+b c d)}{2 a c \sqrt{b^2-4 a c}}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{d \log (x)}{a} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^2 + f*x^4)/(x*(a + b*x^2 + c*x^4)),x]

[Out]

((b*c*d - 2*a*c*e + a*b*f)*ArcTanh[(b + 2*c*x^2)/Sqrt[b^2 - 4*a*c]])/(2*a*c*Sqrt[b^2 - 4*a*c]) + (d*Log[x])/a
- ((c*d - a*f)*Log[a + b*x^2 + c*x^4])/(4*a*c)

Rule 1663

Int[(Pq_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Dist[1/2, Subst[Int[x^((m - 1)/2)
*SubstFor[x^2, Pq, x]*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x^2] && Inte
gerQ[(m - 1)/2]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{d+e x^2+f x^4}{x \left (a+b x^2+c x^4\right )} \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \frac{d+e x+f x^2}{x \left (a+b x+c x^2\right )} \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (\frac{d}{a x}+\frac{-b d+a e-(c d-a f) x}{a \left (a+b x+c x^2\right )}\right ) \, dx,x,x^2\right )\\ &=\frac{d \log (x)}{a}+\frac{\operatorname{Subst}\left (\int \frac{-b d+a e-(c d-a f) x}{a+b x+c x^2} \, dx,x,x^2\right )}{2 a}\\ &=\frac{d \log (x)}{a}-\frac{(c d-a f) \operatorname{Subst}\left (\int \frac{b+2 c x}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a c}-\frac{(b c d-2 a c e+a b f) \operatorname{Subst}\left (\int \frac{1}{a+b x+c x^2} \, dx,x,x^2\right )}{4 a c}\\ &=\frac{d \log (x)}{a}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}+\frac{(b c d-2 a c e+a b f) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^2\right )}{2 a c}\\ &=\frac{(b c d-2 a c e+a b f) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 a c \sqrt{b^2-4 a c}}+\frac{d \log (x)}{a}-\frac{(c d-a f) \log \left (a+b x^2+c x^4\right )}{4 a c}\\ \end{align*}

Mathematica [A]  time = 0.143222, size = 178, normalized size = 1.84 \[ \frac{-\log \left (-\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (c d \sqrt{b^2-4 a c}-a f \sqrt{b^2-4 a c}+a b f-2 a c e+b c d\right )+\log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right ) \left (-c d \sqrt{b^2-4 a c}+a f \sqrt{b^2-4 a c}+a b f-2 a c e+b c d\right )+4 c d \log (x) \sqrt{b^2-4 a c}}{4 a c \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^2 + f*x^4)/(x*(a + b*x^2 + c*x^4)),x]

[Out]

(4*c*Sqrt[b^2 - 4*a*c]*d*Log[x] - (b*c*d + c*Sqrt[b^2 - 4*a*c]*d - 2*a*c*e + a*b*f - a*Sqrt[b^2 - 4*a*c]*f)*Lo
g[b - Sqrt[b^2 - 4*a*c] + 2*c*x^2] + (b*c*d - c*Sqrt[b^2 - 4*a*c]*d - 2*a*c*e + a*b*f + a*Sqrt[b^2 - 4*a*c]*f)
*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/(4*a*c*Sqrt[b^2 - 4*a*c])

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 165, normalized size = 1.7 \begin{align*}{\frac{d\ln \left ( x \right ) }{a}}+{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) f}{4\,c}}-{\frac{\ln \left ( c{x}^{4}+b{x}^{2}+a \right ) d}{4\,a}}+{e\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bd}{2\,a}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}}-{\frac{bf}{2\,c}\arctan \left ({(2\,c{x}^{2}+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^4+e*x^2+d)/x/(c*x^4+b*x^2+a),x)

[Out]

d*ln(x)/a+1/4/c*ln(c*x^4+b*x^2+a)*f-1/4/a*ln(c*x^4+b*x^2+a)*d+1/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^
2)^(1/2))*e-1/2/a/(4*a*c-b^2)^(1/2)*arctan((2*c*x^2+b)/(4*a*c-b^2)^(1/2))*b*d-1/2/(4*a*c-b^2)^(1/2)*arctan((2*
c*x^2+b)/(4*a*c-b^2)^(1/2))*b/c*f

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x/(c*x^4+b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.63331, size = 683, normalized size = 7.04 \begin{align*} \left [\frac{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )} d \log \left (x\right ) +{\left (b c d - 2 \, a c e + a b f\right )} \sqrt{b^{2} - 4 \, a c} \log \left (\frac{2 \, c^{2} x^{4} + 2 \, b c x^{2} + b^{2} - 2 \, a c +{\left (2 \, c x^{2} + b\right )} \sqrt{b^{2} - 4 \, a c}}{c x^{4} + b x^{2} + a}\right ) -{\left ({\left (b^{2} c - 4 \, a c^{2}\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )}}, \frac{4 \,{\left (b^{2} c - 4 \, a c^{2}\right )} d \log \left (x\right ) + 2 \,{\left (b c d - 2 \, a c e + a b f\right )} \sqrt{-b^{2} + 4 \, a c} \arctan \left (-\frac{{\left (2 \, c x^{2} + b\right )} \sqrt{-b^{2} + 4 \, a c}}{b^{2} - 4 \, a c}\right ) -{\left ({\left (b^{2} c - 4 \, a c^{2}\right )} d -{\left (a b^{2} - 4 \, a^{2} c\right )} f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \,{\left (a b^{2} c - 4 \, a^{2} c^{2}\right )}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x/(c*x^4+b*x^2+a),x, algorithm="fricas")

[Out]

[1/4*(4*(b^2*c - 4*a*c^2)*d*log(x) + (b*c*d - 2*a*c*e + a*b*f)*sqrt(b^2 - 4*a*c)*log((2*c^2*x^4 + 2*b*c*x^2 +
b^2 - 2*a*c + (2*c*x^2 + b)*sqrt(b^2 - 4*a*c))/(c*x^4 + b*x^2 + a)) - ((b^2*c - 4*a*c^2)*d - (a*b^2 - 4*a^2*c)
*f)*log(c*x^4 + b*x^2 + a))/(a*b^2*c - 4*a^2*c^2), 1/4*(4*(b^2*c - 4*a*c^2)*d*log(x) + 2*(b*c*d - 2*a*c*e + a*
b*f)*sqrt(-b^2 + 4*a*c)*arctan(-(2*c*x^2 + b)*sqrt(-b^2 + 4*a*c)/(b^2 - 4*a*c)) - ((b^2*c - 4*a*c^2)*d - (a*b^
2 - 4*a^2*c)*f)*log(c*x^4 + b*x^2 + a))/(a*b^2*c - 4*a^2*c^2)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**4+e*x**2+d)/x/(c*x**4+b*x**2+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.17434, size = 131, normalized size = 1.35 \begin{align*} \frac{d \log \left (x^{2}\right )}{2 \, a} - \frac{{\left (c d - a f\right )} \log \left (c x^{4} + b x^{2} + a\right )}{4 \, a c} - \frac{{\left (b c d + a b f - 2 \, a c e\right )} \arctan \left (\frac{2 \, c x^{2} + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt{-b^{2} + 4 \, a c} a c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^4+e*x^2+d)/x/(c*x^4+b*x^2+a),x, algorithm="giac")

[Out]

1/2*d*log(x^2)/a - 1/4*(c*d - a*f)*log(c*x^4 + b*x^2 + a)/(a*c) - 1/2*(b*c*d + a*b*f - 2*a*c*e)*arctan((2*c*x^
2 + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*a*c)